package com.dfs.parent.service.feign;


import com.dfs.parent.common.core.domain.Result;
import com.dfs.parent.common.feign.ProductRequestInterceptor;
import com.dfs.parent.service.dto.ProductDTO;
import com.dfs.parent.service.fallback.ProductFeignClientFallbackFactory;
import com.dfs.parent.service.vo.ProductVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;


@FeignClient(name = "dfs-service-start",
        contextId = "productFeignClient",
       // path = "/product",
       // fallback = ProductFeignClientFallback.class,
        fallbackFactory = ProductFeignClientFallbackFactory.class)
//        configuration = ProductRequestInterceptor.class)
public interface ProductFeignClient {
    @PostMapping("/product/reduceCount")
    Result<ProductVO> reduceCount(@RequestBody ProductDTO productDTO);

    @GetMapping("/product/config")
    Result<String> config();
}
